using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace QFramework
{
    [ExecuteInEditMode]
    public class EffectController : MonoBehaviour
    {
        static  int _FresnelIntensity = Shader.PropertyToID("_FresnelIntensity");
        static int _FresnelColor = Shader.PropertyToID("_FresnelColor");
        public Material material;

 
        public float fresnelIntensity;
        [ColorUsage(false,true)]
        public Color fresnelColor = new Color(1.723048f, 0.5743492f, 0f);

        private void Update()
        {
            if (material)
            {
                fresnelIntensity = Mathf.Clamp(fresnelIntensity,0f,1f);
                material.SetFloat(_FresnelIntensity, fresnelIntensity);
                material.SetColor(_FresnelColor, fresnelColor);

                //1.723048
            }

        }
    }
}
